package cn.tedu.spring.di;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

/**
 * Created by IntelliJ IDEA.
 *
 * @author zq
 * @version 1.0
 * @create 2024-08-02 11:22
 * @since jdk1.8
 */
@Repository
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class UserDao {
    /*
    * @Value 依赖注入注解,注解基本类型;
    * 属性值必须以字符串方式注入,否则会报错,@Value("${属性名}")
    * 添加位置: 属性上 set方法上
    * */
    @Value("jdbc:mysql://localhost:3306/tedu")
    private String url;
    @Value("root")
    private String name;
    @Value("root")
    private String password;
}
